<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>emplist</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link rel="stylesheet" type="text/css" th:href="@{/css/style.css}" />
</head>
<div id="wrap">
    <div id="top_content">
        <div id="header">
            <body>
            <div id="rightheader">
                <p>

                    <br />
                </p>
            </div>
            <div id="topheader">
                <h1 id="title">
                    <a href="#">主页</a>
                </h1>
            </div>
            <div id="navigation">
            </div>
        </div>
        <div id="content">
            <p id="whereami">
            </p>
            <h1>
                欢迎 <span th:text="${session.user.username}"/>!
            </h1>
            <table class="table">
                <tr class="table_header">
                    <td>
                        ID
                    </td>
                    <td>
                        姓名
                    </td>
                    <td>
                        工资
                    </td>
                    <td>
                        年龄
                    </td>
                    <td>
                        生日
                    </td>
                    <td>
                        操作
                    </td>
                </tr>

                <tr  th:class=${empStat.odd}?'row1':'row2' th:each="emp,empStat : ${emps}">
                    <td>
                        <span th:text="${emp.id}"/>
                    </td>
                    <td>
                        <span th:text="${emp.name}"/>
                    </td>
                    <td>
                        <span th:text="${emp.salary}"/>
                    </td>
                    <td>
                        <span th:text="${emp.age}"/>
                    </td>
                    <td>
                        <span th:text="${#dates.format(emp.bir,'yyyy-MM-dd')}"/>
                    </td>
                    <td>
                        <a th:href="@{/emp/delete(id=${emp.id})}">删除资料</a>&nbsp;|&nbsp;
                        <a th:href="@{/emp/find(id=${emp.id})}">修改资料</a>
                    </td>
                </tr>
            </table>
            <p>
                <input type="button" class="button" value="添加" onclick="location.href='/ems/toSave'">
            </p>

        </div>
    </div>
    <div id="footer">
        <div id="footer_bg">

        </div>
    </div>
</div>
</body>
</html>
